<?php
declare(strict_types=1);

namespace ServerApp\lib\server\model\swoole;

use ServerApp\lib\server\model\swoole\lib\SwooleTable;
use swoole_table;

/**
 * Class DeviceList
 * @package Tao\src\util
 */
class DeviceList
{
    const FD = 'fd';

    /**
     *
     */
    public function __construct()
    {
    }

    private static $instance = null;

    /**
     * @return SwooleTable
     */
    public static function getInstance(){
        if (self::$instance == null){
            self::$instance = new SwooleTable(
                8192,
                [
                    self::FD=> [
                        swoole_table::TYPE_INT, 4
                    ]
                ]
            );
        }
        return self::$instance;
    }
}